1. Field of the Invention
The present invention relates to an image processing apparatus and an image processing program.
2. Description of the Related Art
In an example of digital color copying machines, an image forming process in a full color copying mode is realized by copying processes with regard to four basic colors, i.e., cyan (C), magenta (M), yellow (Y), and black (Bk), so as to output the colors on a piece of transfer sheet. In a monochromatic copying mode, a monochromatic image is output on a piece of transfer sheet in a single copying process. Accordingly, in such a copying machine, a consumed amount of toner differs significantly between the full color copying mode and the monochromatic copying mode, whereby cost spent by a user of a copying machine on copying also varies significantly depending on the modes. In addition, an image output on a transfer sheet significantly differs between the modes for image forming processing. A user, thus, needs to pay attention to a switching in an operational mode between the color copying mode and the monochromatic copying mode, and therefore, should properly switch the operational mode according to a type of an image appearing in an original manuscript (an image in an original manuscript). In order to eliminate such a cumbersome switching in the operational mode, an automatic color selection (ACS) technique is known in which a determination on whether an image in an original manuscript is a chromatic image or an achromatic image is automatically made (color determination) and an operational mode of a copying machine is automatically switched according to a determination result. However, when the color determination process makes an erroneous decision, especially when an achromatic image is erroneously determined as a chromatic image, copying processing may be carried out by using the four colors of CMYK. In such a case, the color of an output image appearing on a transfer sheet may be different from the color that a user may expect and cost and time needed for copying process may be increased. Therefore, high accuracy is required in the color determination.
Recently, the digital color copying machine has acquired high affinity for other apparatuses of digital image data processing to combine a facsimile, printer, and scanner functions, in addition to a copying function, to be called a multifunction printer (MFP). Furthermore, an increase in capacity and a reduction in the cost of producing a recording medium such as a hard disc drive (HDD) has enabled an MFP to be equipped with a large capacity storage medium. A scanned image in an original manuscript or an image input from another medium can be stored in a storage medium with a large capacity. The stored images can be read again and can, be reused for a different application purpose from the application purpose when the images were stored. For example, if an image in an original manuscript transmitted by a delivery scanner function after being scanned by a scanner is stored in an HDD, the image data can be delivered to another MFP different from the MFP that was used to scan the image in the original manuscript, or output later again on a transfer sheet without scanning the image in the original manuscript again by the scanner. In addition, the image in the original manuscript is output at unity magnification when being scanned, and thereafter the image in the original manuscript can be output with a magnification ratio of 200%, for example.
Image region separation processing may be applied to the image in the original manuscript to discriminate whether a region of the image in the original manuscript is a character region or a picture region and to output a discrimination result as an image region separation result, or color determination processing may be applied to the image in the original manuscript to determine whether the image in the original manuscript is a chromatic image or an achromatic image as described above. In the image data processing, switching between different methods of image data processing may occur in accordance with the image region separation result or the color determination result, so that the image region separation processing or color determination processing has to be carried out prior to filtering, color correction processing, or γ processing. For example, Japanese Patent Application Laid-open No. 2007-88783 discloses a technique to store image data and supplementary information (e.g., an image region separation result) of the image data simultaneously. This technique enables the capacity of a storage device to be effectively utilized while keeping quality of the image data stored in the storage device.
However, when data scanned by a scanner is stored in a highly reusable condition as disclosed in Japanese Patent Application Laid-open No. 2007-88783, the image data and the supplementary information need to be stored in such a manner that a user can reuse them by certain methods. (For example, refer to Japanese Patent Application Laid-open No. 2007-251835.) As described above, a user who uses the MFP needs to pay attention to the switching between the color copying mode and monochromatic copying mode, and should properly switch the modes depending on the type of the original manuscript. Accordingly, also when the scanned data is reused, ACS function is required to automatically switch an operational mode of a copying machine based on the color determination result. When the MFP is used as a copying machine, in addition to a problem that an image copied on a transfer sheet can be significantly different from an image that a user may expect, there is another problem in that an erroneous determination to determine an achromatic image as a chromatic image increases a cost in copying and decreases a user's productivity. Furthermore, when the MFP is used as a delivery scanner, a file size becomes large if an achromatic image is erroneously determined as a chromatic image because the chromatic image requires color information whereas the achromatic image requires information on brightness only. As a result, the scanned file size occupies too large a region than necessary in an HDD drive mounted on a user's PC. A color determination result, thus, needs to be stored as supplementary information to a stored image. In Japanese Patent Application Laid-open No. 2007-88783, a color determination result is stored as supplementary information to a stored image. As an increase occurs for cases in which a user uses stored data for various application purposes, an increase also occurs for situations in which a user may reuse the stored data for different purposes than the purposes which were originally intended when the data were stored. Accordingly, a color determination result stored as the supplementary information to the stored data may provide a result which is different from the user's intention. For example, an image in an original manuscript may be output by changing the magnification ratios variously depending on the user's application purposes. In such a case, depending on a magnification ratio, only a part of a scanned image in an original manuscript may be output. In such a case, an output target image that is part of an image in an original manuscript may be an achromatic image though whole of the image in the original manuscript is a chromatic image.
With a technique disclosed in Japanese Patent Application Laid-open No. 2002-369012, both image data and color determination results can be retained for various reusing forms. This technique, however, needs a large storage capacity. For example, when an image data is reused by changing its magnification ratio, it requires a significantly large capacity of an HDD drive mounted on the MFP to keep image data corresponding to all the selectable magnification ratios. In addition, nonconformance may occur if a stored image data is reused at the same magnification ratio as the image in the original manuscript despite that only a color determination result with a magnification ratio of 200% is retained, for example. Then, even if the color determination is carried out for the entire image of the original manuscript in capturing the image in the original manuscript data, a re-examination method for the color determination result may be invented to solve problems that may arise if a user's application purposes are different between when an image in an original manuscript has been stored and when the stored image is reused. Generally, during a period of time between a scanning process of an image data by using a scanner and a storing process of the image data, a predetermined processing is carried out for the purpose of increasing productivity by carrying out minimum sorts of image processing when image data is reused after being stored or providing a user with an apparatus valuable as an MFP by increasing affinity for other apparatuses that are used in processing image data.
Now, there arises the possibility that the image processing that is carried out by the time when the image data is stored may affect adversely to reduce the accuracy of the color determination process. Various kinds of image processing are carried out after scanning an image data and before storing the image data such as a conversion of the image data into an image in a desired color space that does not depend on the scanner's characteristics. Another example is a spatial filtering that is carried out to have a desired characteristic of spatial frequency. Such processing, which may be an optimum image processing for a user to obtain a final output image, is not always an optimum image data processing for the purpose of the color determination.
For example, it is necessary for a user, who wants to have an enhanced image, to set enhancement in spatial filtering. Carrying out the enhancement may also enhance a scanning color deviation appearing in the vicinity of a scanned black character. Namely, it is quite possible that a color with a high chroma may appear in the vicinity of a black character after spatial filtering. On the contrary, if an excessive smoothing is carried out in spatial filtering, the color deviation in the vicinity of a black character is smoothed to decrease the chroma, and a color of a colored character becomes lighter to make the color determination of a chromatic image incapable. Several other cases can be considered. For example, it becomes hardly distinguishable between an color deviation in the vicinity of a black character and a true color due to a change of a γ-characteristic after color space conversion. Another example is gray balance, i.e., a gray balance of an image data obtained by a scanning process using a scanner may be changed in the course of storing the image data to optimize the image data for a final output image. An off-gray balance indicates that a pixel having a relationship “R=G=B” which is held when an image is scanned by a scanner does not keep the relationship in a stored image data, i.e., a reference of an achromatic image is shifted to reduce an accuracy of a color determination. If all the image processing conversions are reversible and inverse conversions can be carried out based on the one-to-one correspondences, color determination can be applied to an image by using the inverse conversion process for each image. However, image processing is usually irreversible by its nature. Also, it costs too much man-hour to carry out parametric design for a color determination in each conversion process. Furthermore, even if parametric design is carried out, very low accuracy of color determination may be acquired if the color determination is applied to an image data which has already passed many kinds of image data processing.
Under the above-described circumstances, color determination accuracy may be deteriorated to a greater extent when color determination processing is carried out on an image having been subjected to image processing suitable for storage as image data than when color determination is carried out on an image immediately after being scanned by using a scanner. In particular, a user rarely accepts color determination result if an achromatic image is erroneously determined as a chromatic image. Accordingly, it is necessary to control image processing carefully by referring to the information indicating whether the whole of an image in an original manuscript is to be output and is subjected to color determination, or what kind of an image editing process, has been applied to a target image for color determination, for example. In addition, when color determination needs to be carried out after image editing processing is carried out, a probability for an occurrence of an erroneous color determination in which an achromatic image is determined as a chromatic image can somewhat increase.